import IAnimal.ICat;
import IAnimal.IDog;
import ConcreteAnimal.*;
public class Adapter implements ICat, IDog {
    private ICat cat;
    private IDog dog;

    public ICat getCat() {
        return cat;
    }

    public void setCat(ICat cat) {
        this.cat = cat;
    }

    public IDog getDog() {
        return dog;
    }

    public void setDog(IDog dog) {
        this.dog = dog;
    }

    @Override
    public void cry() {
        System.out.print("猫学狗：");
        dog.cry();
    }

    @Override
    public void action() {
        System.out.print("狗学猫：");
        cat.action();
    }
}
